import { createStore } from 'vuex'
import { IRootState } from './types'
import loginModule from './login/login'
import system from './main/system/system'

const store = createStore<IRootState>({
  state: {
    name: 'pcccccc'
  },
  mutations: {},
  actions: {},
  modules: {
    loginModule,
    system
  }
})

export function setupStore() {
  store.dispatch('loginModule/loadLocalLogin')
}

export default store
